
const STATUS = {
    0: '未支付',
    1: '已支付',
    2: '已取消',
    3: '申请退款',
    4: '已退款'
}

const IS_GROUP = {
    1: '正在拼团',
    2: '已拼成',
    3: '已发货',
    5: '确认收货'
}

export default {
    filters: {
        statusFilter (status) {
            return STATUS[status]
        },
        groupFilter (group) {
            return IS_GROUP[group]
        }
    },
    methods: {
        groupStatus (status) {
            const STATUS = {
                    1: 'processing',
                    2: 'success',
                    3: 'success',
                    5: 'success'
                }
            return STATUS[status]
        },
        orderStatus (status) {
            const STATUS = {
                    0: 'processing',
                    1: 'success',
                    2: 'error',
                    3: 'warning',
                    4: 'error'
                }
            return STATUS[status]
        }
    }
}
